package com.forekonw.demo5;

/**
 * 构造器（构造函数、构造方法）
 * 构造器如何初始化变量
 */
public class ConstrctorDemo {
    private String name;

    public ConstrctorDemo(String name){
        this.name = name;
//        System.out.println("哈哈哈打不过我吧");
    }


    public static void main(String[] args) {
        ConstrctorDemo a = new ConstrctorDemo("tony");

    }
}
